package ln;

import java.util.LinkedList;
import java.util.Queue;

public class BiscuitRepository {
    private static final int CAPACITY = 1000;
    private static final int TIMEOUT = 1000;
    private final Queue<Biscuit> biscuitQueue = new LinkedList<>();

    public boolean isEmpty() {
        return biscuitQueue.isEmpty();
    }

    public boolean isFull() {
        return biscuitQueue.size() >= CAPACITY;
    }

    public Biscuit get() {
        return biscuitQueue.poll();
    }

    public int getSize() {
        return biscuitQueue.size();
    }

    public int getCapacity() {
        return CAPACITY;
    }

    public int getTimeout() {
        return TIMEOUT;
    }

    public void put(Biscuit biscuit) {
        biscuitQueue.add(biscuit);
    }
}
